<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"  prefix="c" %>

  <div>
 	<!-- 地面信息 -->
  	<form method="post"id="landConform" action="project/decorateScheme/addDecorateVerify">
  		<!-- 房间类型 -->
  		<input type="text" name="roomType" id="roomType2" value="${roomType}" hidden="hidden" />
  		<!-- 房间号 	预留-->
  		<input type="text" name="fkroomId" value="" hidden="hidden" />
  		<!-- 客户 	预留-->
  		<input type="text" name="fkcustomerId" hidden="hidden" />
  		<!-- 验收位置  0：四壁  1：顶   2：地面-->
  		<input type="text" name="verifySite" value="2" hidden="hidden" />
  		<!-- 房号、客户  替换上面房号客户 -->
  		<div style="padding:10px 0px">
			<b style="padding:0px 50px 0px 0"><span>房号&nbsp;&nbsp;</span>
			<button class="btn btn-primary radius" type="submit">选择</button></b> <b><span>客户&nbsp;&nbsp;</span>
			<button class="btn btn-primary radius" type="submit">选择</button></b>
			&nbsp;&nbsp;房屋类型：${roomType}
		</div>
  	
		<div>
			<div class="panel panel-default">
	   			<div class="panel-body ">
					<table cellpadding="10" cellspacing="5"  class="mytable">
						<tr>
							<td colspan="2">
								<!-- 附件上传 -->
								<%@include file="../../p_utilePage/Article2.jsp" %>
							</td>
						</tr>
			    		<tr>
			    			<td width="120">装饰材料</td>
			    			<td><input type="text" value="待确认字段">
			    			</td>
			    		</tr>
			    		<tr id="Ground_load">
			    			<td>地面承载</td>
			    			<td>
			    				<textarea name="groundLoad" rows="3" cols="70"></textarea>
			    			</td>
			    		</tr>
				    </table>
				</div>
			</div>
		</div>
			
		<div style="width:100%;text-align:center; padding-top:20px"> 
			<button class="btn btn-primary radius" type="submit" > 保 存</button> 
			 <a class="btn btn-default radius" onClick="closeIframe('gridObj');"> 取 消 </a> 
	    	  <br/><br/>
    	</div> 
		
		<script type="text/javascript">
			var $tr;
			$(function(){
				showLand();
			})
			//隐藏字段
			function showLand(){
				var roomType = '${roomType}';
				$tr=$("#landConform table tr");
				if(roomType=="玄关"){
					var arr = ["排水口","地漏","视频","音频","网络","电话","电源","地板采暖"];
					for(var i=0;i<arr.length;i++){
						eachRemove(arr[i]);
					}
				}else if(roomType=="餐厅" || roomType=="储物间" || roomType=="房间"){
					var arr = ["排水口","地漏"];
					for(var i=0;i<arr.length;i++){
						eachRemove(arr[i]);
					}
				}else if(roomType=="起居室" || roomType=="厨房"){
					var arr = ["排水口","地漏","视频","音频","网络","电话","电源"];
					for(var i=0;i<arr.length;i++){
						eachRemove(arr[i]);
					}
				}else if(roomType=="卫生间"){
					var arr = ["玻璃","地毡","地毯","复合木","实木","排水口","视频","音频","网络","电话","电源"];
					for(var i=0;i<arr.length;i++){
						eachRemove(arr[i]);
					}
				}else if(roomType=="阳台"){
					$("#Ground_load").hide();
					var arr = ["视频","音频","网络","电话","电源"];
					for(var i=0;i<arr.length;i++){
						eachRemove(arr[i]);
					}
				}else if(roomType=="平台"){
					$("#Ground_load").hide();
					var arr = ["地漏","玻璃","实木","砖才","石材","视频","音频","网络","电话","电源","网络","地板采暖"];
					for(var i=0;i<arr.length;i++){
						eachRemove(arr[i]);
					}
				}
			}
			
			function eachRemove(arr){
				//for(var j=0;j<arr.length;i++){
					$tr.each(function(i,v){//before()
						var td=$(v).children("td").eq(0);
						var text=td.text();
						var $v=$(v);
						if(text==arr){
							$v.remove();
						}
					});
				//}
			}
		</script>
	</form>
</div>
